/**
 * @author chengqige
 * @copyright turing@大连大学图灵工作室
 * @version 1.0
 * @updated 2022/3/13 23:29
 * @description 允许自定义header，支持头跨域
 */
const headers = function (option = []) {
    var Headers = []
    if (!option.length) {
        Headers = '*'
    } else {
        Headers = [...option]
    }
    return function (req, res, next) {
        res.set('Access-Control-Expose-Headers', Headers)
        next()
    }
}
module.exports = headers
